home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / games1 / bridgscr.lha / bridgescore / BridgeScore.doc < prev    next >
Text File  |  1996-04-26  |  7KB  |  203 lines

  1. BridgeScore
  2.  
  3.  
  4. Welcome to BridgeScore - the duplicate bridge scoring system.
  5.  
  6.  
  7. Introduction
  8.  
  9. The idea of this program is to calculate the overall scores of the
  10. participants in a duplicate bridge tournament.
  11. The user (that's you!) will have to type in the results from the
  12. travellers (the scorecards accompanying each board).  You then give
  13. BridgeScore this file, and an output file where the results will be
  14. output, along with summaries for each board.  This file can be read,
  15. edited or sent straight to the nearest printer.
  16. BridgeScore will attempt to tell you about any errors in your data
  17. file that it detects.
  18.  
  19.  
  20.  
  21. How Scoring Works
  22.  
  23. If you are scoring for a duplicate bridge tournament, you probably
  24. understand scoring anyway.  However, I will try to explain the system
  25. I have been using to write this program.  You would also like to have
  26. the computer do the work rather than you!
  27.  
  28. First, take one board.
  29. 1. Sort the North-South pairs into order, depending on their raw score
  30. 2. Allocate points depending on the position, with the top pair
  31. getting 2*(N-1) points, and decreasing by 2 for each lower position to
  32. zero points for the bottom pair.  Here N is the number of pairs (NS)
  33. on that board.  Equal positions will share the points e.g. if 2 pairs
  34. came joint bottom, they would share the 2 and 0 points to get 1 point
  35. each.
  36. 3. Also note the maximum possible score possible on that board - each
  37. pair could have got the maximum 2*(N-1) points.
  38. 4. East-West pair scores can be calculated from the scores and
  39. positions of their North-South opponents.
  40.  
  41. Repeat all this for each board.
  42.  
  43. Now sum up.
  44. 1. For each pair, sum all the points they gained from their positions
  45. on each board.
  46. 2. Also get their maximum possible scores.
  47. 3. Divide (1) by (2) to get their percentage score.
  48. 4. Allocate overall positions based on this percentage - so North-
  49. South and East-West have their own, separate league tables.
  50.  
  51.  
  52.  
  53. Operation
  54.  
  55. First comes the hard part.  Take all your traveller cards after the
  56. tournament, sit down in front of your favourite text editor (Workbench
  57. ed is a poor choice I find - it adds too much junk to the start of
  58. files; CygnusEd, dme, memacs seem OK though) and type in the results,
  59. as detailed - "file input".
  60. Now, for safety, copy this file to disk, and put a copy in ram: (you
  61. can never trust other people's programs with important files,
  62. especially PD).  Now choose a location for the output file (e.g.
  63. ram:outputfile).
  64. Open a shell and type 'BridgeScore ram:inputfile ram:outputfile'.
  65. If all goes well, look at "file output" to explain the results.  If
  66. there are any problems, BridgeScore will try to tell you what happened
  67. and on which line, as well as it can.
  68.  
  69.  
  70.  
  71. File Input
  72.  
  73. You will need to now the format for the input files.
  74. N.B. Workbench Ed seems to add lots of junk to the start of files,
  75. making them hard to read.  Until I have looked further into this,
  76. do not use this.  Others are OK, on most computer formats without
  77. translation.
  78.  
  79. First, give the number of boards.
  80. Next line, give the number of pairs playing North-South.
  81. Next line, give the number of pairs playing East-West.  This should be
  82. equal to or one greater than the number of North-South pairs.
  83. Now comes the data for the boards.
  84. Now give the scores, on each line giving a board number, NS pair, EW
  85. pair, score to NS.
  86. e.g. '2 1 2 -50' means Board 2, NS pair 1 played EW pair 2, EW won
  87. with a score of 50 (or -50 to NS).
  88. Put each of these scores on a separate line.
  89. Always place these in the above order, although any order can be used
  90. for the lines themselves, i.e. you don't need to group all the scores
  91. for Board 1 together.
  92. Finally, put the word 'end' after your data - just in case your editor
  93. makes a mess at the end of its files.
  94.  
  95.  
  96. Example
  97.  
  98. 2
  99. 2
  100. 3
  101. 1 1 2 -50
  102. 1 2 1 0
  103. 2 1 3 300
  104. 2 2 1 100
  105. end
  106.  
  107. There were 2 boards, with 2 pairs playing North-South (each played 2
  108. boards), and 3 played East-West (pairs 2 and 3 only played one board).
  109. On board 1, EW2 gained a score of 50 against NS1.  NS2 and EW1 passed
  110. out (good for NS2).
  111. For board 2, NS1 gained 300 points against EW3.  NS2 only gained 100
  112. points against EW1.  EW2 did not play on this board.
  113.  
  114.  
  115.  
  116. File Output
  117.  
  118. The first data to be written to the output file are the board
  119. summaries.  The board number is given, then the pairs playing each
  120. other, the raw scores (to NS), and the position of the NS pair on the
  121. board.  This is repeated for each board given.
  122.  
  123. Following this are the overall results.  On the left are the NS
  124. results, giving each pair, their overall percentage score and their
  125. position.  On the right, the same for EW.
  126.  
  127.  
  128.  
  129. Problems
  130.  
  131. BridgeScore will give a little information about problems it
  132. encounters in a data file.
  133.  
  134. Note that it may get confused on subsequent errors.
  135. It should spot the following:
  136. 1. Too many boards or pairs - maximum 45 boards and 30 pairs
  137. 2. Some illegal scores e.g. 4, 412 etc.
  138. 3. Not declaring all the data on a line e.g. missing off the score.
  139.  
  140. Not detected yet.
  141. 1. Giving data for an undeclared board - this may crash program!
  142. 2. Giving data in wrong order on line - may be noticed by subsequent
  143. effects?
  144. 3. Rogue characters e.g. letters.
  145. 4. Tell me!
  146.  
  147.  
  148.  
  149. Disclaimer and Copyright
  150.  
  151. Disclaimer
  152.  
  153. This program is supplied 'as is' and without warranty of any type.  No
  154. responsibility is accepted for any damage or loss to your hardware,
  155. data or yourself and any third parties - the risk is all yours!
  156.  
  157.  
  158. Copyright
  159.  
  160. This program is supplied as freeware - there is no charge for use of
  161. it in any circumstances.  You are free to distribute it in its
  162. original archive only with all accompanying documentation, and the
  163. copyright remains with the author.
  164.  
  165.  
  166.  
  167. Author
  168.  
  169. Trevor Wright
  170.  
  171. PhD student at Cambridge University, studying the metal-insulator
  172. transition metal-semiconductor films.
  173.  
  174. e-mail:   tw116@cus.cam.ac.uk - note that this address will terminate
  175. sometime in the summer of 1996.
  176.  
  177. Motivation - I originally wrote this in AMOS, to help my parents who
  178. are occasional tournament directors at their local bridge clubs.  This
  179. is the conversion to C, so I can maintain the program into the future.
  180. The Amiga version was compiled in SAS/C 6.56 on an A1200; I hope to
  181. compile this for IBM's later on (in which case, there will be no
  182. amigaguide documentation!)  This is still a beta version, but it seems
  183. OK.  Please feel free to make any comments, point out bugs, etc. to my
  184. e-mail address.
  185.  
  186.  
  187.  
  188. To Do
  189.  
  190. I found no performance increase for compiles to higher
  191. processors/coprocessors, so none are included.  You will find the
  192. speed fast enough anyway, even on the slower computers (it used to run
  193. in BASIC, remember).  Typing in the data won't be so fast though!
  194.  
  195. Assuming there are no bugs in the scoring, my attention will probably
  196. be directed towards the file input side.  To make this directly
  197. portable though, there will be no fancy GUI's.  I will try to work on
  198. any problems pointed out to me.  In addition, I may consider adapting
  199. the program to other board movements.
  200.  
  201. This version is 0.9 beta.
  202.  
  203.